﻿@model IEnumerable<IRIS.Models.ContentCategory>

@{
    ViewBag.Title = "Index";
}

<h2>Flokkar</h2>

<table>
    <tr>
        <th>
            Nafn
        </th>
        <th>
            Lýsing
        </th>
        
        <th></th>
    </tr>

@if (Model.Count() > 0)
{
    foreach (var item in Model)
    {
        <tr>
            <td>
                @Html.DisplayFor(modelItem => item.Name)
            </td>
            <td>
                @Html.DisplayFor(modelItem => item.Description)
            </td>
            <td>
                @Html.ActionLink("Edit", "Edit", new { id = item.ID, delete = false }) |
                @Html.ActionLink("Delete", "Edit", new { id = item.ID, delete = true })
            </td>
        </tr>
    }
}
else
{
    <p>Enginn Flokkur</p>
}
</table>


